package com.ibm.finance.tools.wwcet.util.hdsc;

import java.lang.*;

/**
 * This exception is thrown by DBDataExporter when some error occurs while accessing the database. It holds SQL error code and state.
 * 
 * Thread Safety:
 * This class is not thread safe because its base class is not thread safe.
 */
public class DBDataExportingDatabaseException extends DBDataExportingException {
    /**
     * The SQL error code for this exception. Is initialized in the constructor and never changed after that. Can be any value. Has a getter.
     */
    private  int errorCode;

    /**
     * The SQL state for this exception. Is initialized in the constructor and never changed after that. Can be any value. Has a getter.
     */
    private  String sqlState;
    
    
    /**
     * Creates a new instance of this exception with the given message, error code and SQL state.
     * 
     * Parameters:
     * message - the detailed error message of this exception
     * errorCode - the SQL error code for this exception
     * sqlState - the SQL state for this exception
     * 
     * Implementation Notes:
     * 1. super(message);
     * 2. this.errorCode = errorCode;
     * 3. this.sqlState = sqlState;
     * @param sqlState the SQL state for this exception
     * @param message the detailed error message of this exception
     * @param errorCode the SQL error code for this exception
     */
    public DBDataExportingDatabaseException(String message, int errorCode, String sqlState) {
    }

    /**
     * Creates a new instance of this exception with the given message, cause, error code and SQL state.
     * 
     * Parameters:
     * message - the detailed error message of this exception
     * cause - the inner cause of this exception
     * errorCode - the SQL error code for this exception
     * sqlState - the SQL state for this exception
     * 
     * Implementation Notes:
     * 1. super(message, cause);
     * 2. this.errorCode = errorCode;
     * 3. this.sqlState = sqlState;
     * @param sqlState the SQL state for this exception
     * @param message the detailed error message of this exception
     * @param cause the inner cause of this exception
     * @param errorCode the SQL error code for this exception
     */
    public DBDataExportingDatabaseException(String message, Throwable cause, int errorCode, String sqlState) {
    }

    /**
     * Retrieves the SQL error code for this exception.
     * 
     * Returns:
     * the SQL error code for this exception
     * @return the SQL error code for this exception
     */
    public int getErrorCode() {
        return 0;
    }

    /**
     * Retrieves the SQL state for this exception.
     * 
     * Returns:
     * the SQL state for this exception
     * @return the SQL state for this exception
     */
    public String getSqlState() {
        return null;
    }
}

